package rdb.model;

public class BaseObject implements IRedisObject {
    public int dbIndex;
    public String key;
    public long expiration;
    public int size;
    public ValueType type;
    public String encoding;

    public BaseObject() {

    }

    public BaseObject(BaseObject otherObj) {
        dbIndex = otherObj.dbIndex;
        key = otherObj.key;
        expiration = otherObj.expiration;
        size = otherObj.size;
        type = otherObj.type;
        encoding = otherObj.encoding;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public void setType(ValueType type) {
        this.type = type;
    }

    @Override
    public ValueType getType() {
        return null;
    }

    @Override
    public String getKey() {
        return key;
    }

    public void setDbIndex(int dbIndex) {
        this.dbIndex = dbIndex;
    }

    @Override
    public int getDBIndex() {
        return dbIndex;
    }

    public void setExpiration(long expiration) {
        this.expiration = expiration;
    }

    @Override
    public long getExpiration() {
        return expiration;
    }

    @Override
    public String getEncoding() {
        return encoding;
    }

    @Override
    public Object getValue() {
        return null;
    }

    public String[] getCmdLines() {
        return null;
    }
}

